package com.gitee.huanminabc.fastboot.load.classload;

import com.gitee.huanminabc.fastboot.annotation.Aop;
import com.gitee.huanminabc.fastboot.context.AppContext;

/**
 * 简要描述
 *
 * @Author: huanmin
 * @Date: 2025/4/13 00:28
 * @Version: 1.0
 * @Description: 文件作用详细描述....
 */
public class AopClassLoad implements ClassLoadIntercept {
    @Override
    public void peek(Class<?> clazz) throws Exception {
        if (AppContext.appBaseInfoConfig.getAop()) {
            Aop aop = clazz.getAnnotation(Aop.class);
            //如果是Aop类,那么就需要单独处理
            if (aop != null) {
                AppContext.allAopInterceptorHandleClasses.add(clazz);
            }
        }
    }
}
